#!/bin/bash
# 测试 wfh-cli 命令

echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🧪 测试 WFH-CLI 命令"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""

# 检查命令是否存在
if command -v wfh-cli &> /dev/null; then
    echo "✅ wfh-cli 命令已安装"
    echo "   位置: $(which wfh-cli)"
else
    echo "❌ wfh-cli 命令未找到"
    exit 1
fi

echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "📝 配置文件状态"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""

if [ -f .gemini/.env ]; then
    echo "✅ 配置文件存在: .gemini/.env"
    echo ""
    echo "当前配置:"
    grep -E '^(LLM_PROVIDER|LLM_MODEL|SEARCH_ENGINE)=' .gemini/.env || echo "  (未找到关键配置)"
else
    echo "❌ 配置文件不存在: .gemini/.env"
fi

echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🚀 启动方式"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "方式 1 (推荐):"
echo "  cd /Users/fenghuanwang/gemini-cli"
echo "  ./START.sh"
echo ""
echo "方式 2 (直接运行):"
echo "  cd /Users/fenghuanwang/gemini-cli"
echo "  source .gemini/.env"
echo "  wfh-cli"
echo ""
